<%@ page language="java" contentType="text/html; charset=UTF-8"
    pageEncoding="UTF-8"%>
<%@taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%>
<%@ taglib prefix="fn" uri="http://java.sun.com/jsp/jstl/functions"%>
<%@ page isELIgnored="false" %>
<!DOCTYPE html>
<html>
	<head>
		<meta charset="utf-8">
		<title></title>
		<meta charset="utf-8">
		<title>SF轻小说-全国最大的轻小说网站</title>
		<meta charset="utf-8">
		<meta http-equiv="X-UA-Compatible" content="IE=edge">
		<meta name="viewport" content="width=device-width, initial-scale=1">
		<!-- 上述3个meta标签*必须*放在最前面，任何其他内容都*必须*跟随其后！ -->
		<title>Bootstrap 101 Template</title>
		
		<!-- Bootstrap -->
		<link href="${pageContext.request.contextPath}/css/bootstrap.min.css" rel="stylesheet">
		<!-- jQuery (Bootstrap 的所有 JavaScript 插件都依赖 jQuery，所以必须放在前边) -->
		<script src="${pageContext.request.contextPath}/js/jquery-1.11.0.min.js"></script>
		<!-- 加载 Bootstrap 的所有 JavaScript 插件。你也可以根据需要只加载单个插件。 -->
		<script src="${pageContext.request.contextPath}/js/bootstrap.min.js"></script>
		<link href="${pageContext.request.contextPath}/css/ITpage.css" rel="stylesheet"/>
	</head>
	<body>
		<div class="container">
			<div class="row" id="a">
				<div class="col-lg-1"></div>
				<div class="col-lg-3">
					<img src="${pageContext.request.contextPath }/images/goods/logo.png"/>
				</div>
				<div class="col-lg-5"></div>
				<div class="col-lg-3">
					<div class="a_1">
						<a href="${pageContext.request.contextPath }/page/vipPage.jsp">个人中心</a> | <a href="${pageContext.request.contextPath }/showShopService">我的订单</a><br/>
						[ <a href="${pageContext.request.contextPath}/page/login1.jsp">登录</a> ] | [ <a href="${pageContext.request.contextPath}/page/login2.jsp">免费注册</a> ]
					</div>
				</div>
				</div>
			<div class="row" id="b">
				<div class="col-lg-1"></div>
				<div class="col-lg-4">
					<ul class="nav navbar-nav">
						<li class="active"><a href="${pageContext.request.contextPath}/index.jsp">首页<span class="sr-only">(current)</span></a></li>
							<li class="dropdown">
							<a href="#" class="dropdown-toggle" data-toggle="dropdown" role="button" aria-haspopup="true" aria-expanded="false">书库<span class="caret"></span></a>
							<ul class="dropdown-menu">
								<li><a href="${pageContext.request.contextPath }/findPageServlet?currentPage=1&id=1">IT技术</a></li>
					            <li><a href="${pageContext.request.contextPath }/findPageServlet?currentPage=1&id=2">小说文学</a></li>
					            <li><a href="${pageContext.request.contextPath }/findPageServlet?currentPage=1&id=3">历史传记</a></li>
					            <li><a href="${pageContext.request.contextPath }/findPageServlet?currentPage=1&id=4">生活</a></li>
					            <li><a href="${pageContext.request.contextPath }/findPageServlet?currentPage=1&id=5">经营管理</a></li>
					            <li><a href="${pageContext.request.contextPath }/findPageServlet?currentPage=1&id=6">SF轻小说</a></li>
					          </ul>
						</li>
						<li><a href="#">排行榜</a></li>
						<li><a href="#">App下载</a></li>
					</ul>
				</div>
				<div class="col-lg-4">
					<form class="navbar-form navbar-left">
					    <div class="form-group">
							<input type="text" class="form-control" placeholder="输入作品名/作者名">
					    </div>
					    <button type="submit" class="glyphicon glyphicon-hand-right btn btn-info">&nbsp;搜索</button>
					</form>
				</div>
				<div class="col-lg-3">
					<div class="b_1">
					<div class="btn-group">
					  <button type="button" class="btn btn-default btn-sm">购物车0件</button>
					  <button type="button" class="btn btn-info dropdown-toggle btn-sm" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false">
					    <span class="caret"></span>
					    <span class="sr-only">Toggle Dropdown</span>
					  </button>
						<a class="btn btn-warning btn-sm" href="#" role="button">结算</a>
					  <ul class="dropdown-menu">
					    <li><a href="#">商品1</a></li>
					    <li><a href="#">商品2</a></li>
					    <li><a href="#">商品3</a></li>
					    <li><a href="#">商品4</a></li>
					  </ul>
					</div>
					</div>
				</div>
			</div>
			<div class="row" id="c">
				<div class="col-lg-12">
					<div class="c_1"> 搜索结果 <font style="font-size: 10px;">(共 <font style="color: hotpink">${pageBean.totalCount }</font> 件商品)</font> </div>
				</div>
			</div>
			<div class="row" id="d">
				<c:forEach items="${pageBean.list }" var="goods">
					<div class="col-lg-2 text-center">
						<div class="d_1 text-center img-responsive center-block">
							<a href="${pageContext.request.contextPath }/singlyServlet?id=${goods.id}"><img src="${pageContext.request.contextPath}/${goods.image}" onclick="aaa()"></a> 
						</div>
						<div>${fn:substring(goods.name, 0, 11)}</div>
						<div>惊喜价：￥${goods.salesprice }</div>
						<div>市场价：￥<del style="color: red;">${goods.marketprice }</del></div>
						<div><hr></div>
					</div>
				</c:forEach>
			</div>
			<div class="row" id="f">
				<div class="col-lg-3"></div>
				<div class="col-lg-6 text-center">
					<nav aria-label="Page navigation">
						<ul  class="pagination">
							<c:if test="${pageBean.currentPage == 1 }">
								<li><a href="${pageContext.request.contextPath}/findPageServlet?currentPage=1&id=${id}">上一页</a></li>
							</c:if>
							<c:if test="${pageBean.currentPage != 1 }">
								<li><a href="${pageContext.request.contextPath}/findPageServlet?currentPage=${pageBean.currentPage-1}&id=${id}">上一页</a></li>
							</c:if>
								<c:forEach begin="1" end="${pageBean.totalPages }" step="1" var="page">
									<li><a href="${pageContext.request.contextPath}/findPageServlet?currentPage=${page }&id=${id}">${page }</a></li>
								</c:forEach>
							<c:if test="${pageBean.currentPage == pageBean.totalPages }">
								<li><a href="${pageContext.request.contextPath}/findPageServlet?currentPage=${pageBean.totalPages }&id=${id}">下一页</a></li>
							</c:if>
							<c:if test="${pageBean.currentPage != pageBean.totalPages }">
								<li><a href="${pageContext.request.contextPath}/findPageServlet?currentPage=${pageBean.currentPage+1 }&id=${id}">下一页</a></li>
							</c:if>
						</ul>
					</nav>
				</div>
				<div class="col-lg-3"></div>
			</div>
			
			<div class="row" id="g">
				<div class="col-lg-2"></div>
				<div class="col-lg-8 text-center" style="height:35px;">
					<div id="g_1">
						<a href="img.html">免责声明</a> &nbsp;|&nbsp; <a href="img.html">版权隐私</a> &nbsp;|&nbsp; <a href="img.html">联系方式</a> &nbsp;| &nbsp; <a href="img.html">友情链接</a> &nbsp;| &nbsp;
						<a href="img.html">广告投放</a> &nbsp;|&nbsp; <a href="img.html">粤ICP备10062407号</a> &nbsp;|&nbsp; <a href="img.html">免责声明</a>
					</div>
				</div>
				<div class="col-lg-2"></div>
			</div>
			<div class="row" id="g">
				<div class="col-lg-2"></div>
				<div class="col-lg-8 text-center">
					粤文网[2012]0726-109号[c]2005 - 2014 SFACG.COM ALL Rights Reserved
				</div>
				<div class="col-lg-2"></div>
			</div>
		</div>
	</body>
</html>
